package com.us.usws.site.ws.entity.theme;

import com.us.usws.model.domain.box.BoxTheme;
import com.us.usws.site.ws.entity.WSEntity;
import com.us.usws.site.ws.entity.WSEntityFactory;

public class WSThemeEntityPackGenerator {

	//private static Log log = LogFactory.getFactory().getInstance(WSEntityPackGenerator.class);

	private static WSThemeEntityPackGenerator instance = new WSThemeEntityPackGenerator();

	private WSThemeEntityPackGenerator() {
	}

	public static WSThemeEntityPackGenerator getInstance() {
		return instance;
	}

	/*---------------- public methods -----------------*/

	public WSEntity getThemePack(BoxTheme m) {
		if (m == null) {
			return WSEntityFactory.getEmptyEntityWithRecords();
		}

		//prepare return videos
		WSTheme data = PackEntityConverter.getTheme(m);

		//pack records
		WSEntity ret = WSEntityFactory.getDefaultWSEntity(data);
		return ret;
	}

	public WSEntity getThemeDetailPack(BoxTheme m) {
		if (m == null) {
			return WSEntityFactory.getEmptyEntityWithRecords();
		}

		//prepare return videos
		WSThemeDetail data = PackEntityConverter.getThemeDetail(m);

		//pack records
		WSEntity ret = WSEntityFactory.getDefaultWSEntity(data);
		return ret;
	}

}
